Natural images which have been scanned into electronic image processing systems often have undesirable color casts which should (desirably) be removed. These casts may result from imperfections and errors within the image acquisition process. For example a scanned photograph may have been taken under lighting conditions which were inappropriate for the film type.
One method for determining how big a correction needs to be made for each picture is for an operator to add color to the image interactively until it looks "right." This method has the disadvantages of requiring a great deal of operator attention and judgement, and requiring a highly accurate color monitor.
One set of automatic methods involve assumptions about what colors various parts of the image should be. These methods assume, for instance, that bluish areas near the tops of pictures are sky, that the average color for a scene is gray, or that colors within a certain range are flesh. These methods are sensitive to image content; however, the assumption may simply be wrong for many images.
Another approach to determining the degree of color cast is to estimate the color of the illuminant of the original scene, as recorded in the image. In actual scenes, the human visual system tends to perceive the illuminant as neutral. Therefore, a color transform which maps the recorded color of the illuminant to neutral will tend to produce a balanced picture.
One method for making this estimate is for the system to detect specular highlights in the picture. Specular highlights in a natural scene tend to have the same color as the scene illuminant. This method has three disadvantages. First, not every scene contains specular highlights. Second, it only determines the color cast at bright luminances. Finally, because highlights tend to be the brightest objects in a scene, their color is particularly susceptible to being distorted by non-linearities in the capture process.
A method has been proposed by Lee (U.S. Pat. No. 4,685,071) which takes advantage of the fact that the reflected light from many objects contains both a specular and a diffuse component. Lee's method estimates the color of the scene illuminant by detecting the specular component and estimating its chromaticity.
Lee's method has the advantage that natural scenes do generally contain a number of differently colored objects having the proper reflectance properties. However the method contains a time-consuming pre-filtering step. In addition, the method either completely accepts or completely rejects any given candidate measure of scene illuminant, thereby giving an inordinate amount of importance to marginal subsets of the image. That is, measures that are highly likely to be accurate receive the same weight as measures that are less likely to be accurate. Finally the method does not account for distortions produced by the non-linearities of the photographic process. These non-linearities make measured colors a less reliable indicator of illuminant as those colors approach the edge of the input gamut. They also cause the measured illuminant chrominance to vary with luminance.
It is the object of the present invention to provide an improved method for detecting and correcting for scene illuminant based on the distribution of chrominances in an image.